//
//  HYOUStrategyHeadViewCell.m
//  BestGift
//
//  Created by 温晓宇 on 16/1/11.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "HYOUStrategyHeadViewCell.h"

@interface HYOUStrategyHeadViewCell ()

@property(nonatomic, retain)UIImageView *scrollImage;

@end

@implementation HYOUStrategyHeadViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubViews];
    }
    return self;
}
-(void)createSubViews{
    self.scrollImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, (WIDTH - 20) / 2, 80)];
//        self.scrollImage.backgroundColor = [UIColor blackColor];
    self.scrollImage.layer.cornerRadius = 5;
    self.scrollImage.layer.masksToBounds = YES;
    [self.contentView addSubview:self.scrollImage];
}
-(void)setModel:(HYOUStrategyCellModel *)model{
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    NSURL *url = [NSURL URLWithString:self.model.banner_image_url];
    [self.scrollImage sd_setImageWithURL:url];
}
@end
